<%@ page import="java.util.*, SiTuQingYou.vo.*,SiTuQingYou.util.*"  language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%String path=request.getContextPath() ;%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
#page{width:100%;height:150vh;}
#divst
{
height:800px;
width:1000px;
margin:auto;
margin-top:30px;
}
#title
{
margin:auto;
text-align: center;
}
#single
{
border:1px solid gray;
width:300px;
height:350px;
float:left;
margin-left:10px;
margin-top:10px;
}
#pic
{
width:298px;
height:200px;
}
#infor
{
width:300px;
height:150px;
}
#pic img
{
width:100%;
height:100%;
}
#pic div
{
  width:300px;
  position: absolute;
  color:white;
  margin:150px auto;
  font-family:sans-serif;
  text-align:center;
}
.pager a{display:inline-block; width:40px;height:40px;background-color:gray;color:white;text-align:center;line-height:40px;border-radius:18px;text-decoration:none;}
.pager a.cur{background-color:green;} 
</style>



</head>
<body>
<div id="page">
<jsp:include page="header.jsp"></jsp:include>
<jsp:include page="/ShowClassSceneServlet?method=getSceneByThemeId"></jsp:include>	
<%ArrayList<Scene>scenes=(ArrayList<Scene>)request.getAttribute("scenes");
Pager pager = (Pager) request.getAttribute("pager"); 
Object b = request.getAttribute("pics");
ArrayList<String> pics = (ArrayList<String>)b;
 
%>
<div id="divst">
 
<div id="title"><h1><%=request.getParameter("theme")%></h1></div>
<%
for(int i=0;i<scenes.size();i++)
{
%>
<div id="single">
<div id="pic"><a style="text-decoration:none;" href="<%=path%>/index/sceneinfo.jsp?method=sceneinfo&id=<%=scenes.get(i).getId()%>"><div><h2><%=scenes.get(i).getScenename() %></h2></div><img src="<%=path%>/images/<%=pics.get(i) %>"></a></div>
<div id="infor"><a style="text-decoration:none;"  href="<%=path%>/index/sceneinfo.jsp?method=sceneinfo&id=<%=scenes.get(i).getId()%>"><%=scenes.get(i).getIntro() %></a></div>
</div>


<!--  <li>
<ul>
<li><h2><%=scenes.get(i).getScenename() %></h2></li> 
<li><img src="<%=path%>/images/<%=pics.get(i) %>"></li> 
<li><%=scenes.get(i).getIntro() %></li> 
</ul>
</li>--> <%  
}
%>
</div>

<div class="pager">
         <%
           for(int i=1;i<=pager.getPageCount();i++)
           {%>
              <a href="<%=path%>/index/sceneByType.jsp?pageNum=<%=i%>" class=<%=(i==pager.getPageNum()?"cur":"")%>><%=i%></a>
           
          <%}%>
                         共<%=pager.getPageCount() %>页   共<%=pager.getDataCount() %>记录 
</div>	
</div>
<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>